package com.xi2.controller;

import com.xi2.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author GHOSTLaycoo
 * @date 2020/3/18 0018 - 下午 22:05
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/login")
    public Boolean loginByUser(@RequestParam String username,@RequestParam String password){
        Boolean aBoolean = userService.loginByUser(username, password);
        return aBoolean;
    }
}
